﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="coupon_index" %>

<%@ OutputCache Duration="1" VaryByParam="none"%>
<%@ Register src="../UserControls/CFooterControl.ascx" tagname="CFooterControl" tagprefix="uc1" %>
<%@ Register src="../UserControls/CHeaderControl.ascx" tagname="CHeaderControl" tagprefix="uc2" %>

<%@ Register src="../UserControls/blockaboutcoupon.ascx" tagname="blockaboutcoupon" tagprefix="uc3" %>

<%@ Register src="../UserControls/MyWebside.ascx" tagname="MyWebside" tagprefix="uc4" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    
 <div id="pagemasker"></div><div id="dialog"></div>
<div id="doc">
    <uc2:CHeaderControl ID="CHeaderControl1" runat="server" />

    <div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<uc4:MyWebside ID="MyWebside1" runat="server" />
	</div>
    <div id="content" class="coupons-box clear">
		<div class="box clear">
            
            <div class="box-content">
                <div class="head">
                    <h2>我的优惠券</h2>
                    <ul class="filter">
						<li class="label">分类: </li>
						<li <%=GetStyle("N",consum) %>><a href="index.aspx?consum=N">未使用</a> </li>
                        <li <%=GetStyle("Y",consum) %>><a href="index.aspx?consum=Y">已使用</a></li>
                        <li <%=GetStyle("expire",consum) %>><a href="index.aspx?consum=expire">已过期</a></li>
					</ul>
				</div>
                <div class="sect">
					
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
						<tr><th width="240">项目名称</th><th width="100" nowrap>优惠券编号</th><th width="60" nowrap>密码</th><th width="100" nowrap>有效日期</th><th width="100">操作</th></tr>

 <% int i = 0;%>
                    <%foreach (Maticsoft.Model.Coupon couponmodel in couponlist)
                      {
                         
                          if (i % 2 != 0)
                          {%>
                               <tr>
                               	<td><a class="deal-title" href="/team.aspx?id=<%=couponmodel.Team_id %>" target="_blank"><%=GetTeam(couponmodel.Team_id.ToString())%></a></td>
							<td><%=couponmodel.Id %></td>
							<td><%=couponmodel.Secret %></td>
							<td><%=DateTime.Parse(couponmodel.Expire_time.ToString()).ToString("yyyy-MM-dd") %></td>
							<td>
                            
                         <%if (couponbll.isTime(couponmodel.Expire_time) == false)
                              { %>
                              已过期
                            <% }
                              else
                              {%>
                            <a href="/ajax/coupon.aspx?action=sms&id=<%=couponmodel.Id %>" class="ajaxlink">短信</a>｜<a href="/coupon/print.aspx?couponid=<%=couponmodel.Id %>" target="_blank">打印</a>
                            
                            <% }%>
                            
                            
                            </td>
						</tr>
                         <% }
                          else
                          {%>
                               <tr class="alt">
                               <td><a class="deal-title" href="/team.aspx?id=<%=couponmodel.Team_id %>" target="_blank"><%=GetTeam(couponmodel.Team_id.ToString())%></a></td>
							<td><%=couponmodel.Id %></td>
							<td><%=couponmodel.Secret %></td>
							<td><%=DateTime.Parse(couponmodel.Expire_time.ToString()).ToString("yyyy-MM-dd") %></td>
							<td>
                            <%if (couponbll.isTime(couponmodel.Expire_time) == false)
                              { %>
                              已过期
                            <% }
                              else
                              {%>
                            <a href="/ajax/coupon.aspx?action=sms&id=<%=couponmodel.Id %>" class="ajaxlink">短信</a>｜<a href="/coupon/print.aspx?couponid=<%=couponmodel.Id %>" target="_blank">打印</a>
                            
                            <% }%>
                            
                            </td>
						</tr>
                         <% }
                      
                            i++;
                      }%>	
				
						<tr><td colspan="5"><%=strpage%></td></tr>
                    </table>
				</div>
            </div>
            
        </div>
    </div>
    <div id="sidebar">
	<uc3:blockaboutcoupon ID="blockaboutcoupon1" 
            runat="server" />
   
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->



    <uc1:CFooterControl ID="CFooterControl1" runat="server" />




</div>


    </form>
</body>
</html>
